package com.songlanyun.modules.systeminfo.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.songlanyun.common.validator.group.AddGroup;
import com.songlanyun.common.validator.group.UpdateGroup;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**
 * 平台信息
 *
 * @author Mark
 * @email sunlightcs@gmail.com
 * @date 2020-12-02 13:07:36
 */
@Data
@TableName("yxt_system_info")
public class SystemInfo implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     *
     */
    @TableId
    private Long id;
    /**
     * 平台名称
     */
    @TableField("`name`")
    @NotBlank(message = "平台名称不能为空")
    @Length(min = 1, max = 16, message = "平台名称在1-16之间")
    private String name;
    /**
     * 平台标题
     */
    @NotBlank(message = "平台标题不能为空")
    @Length(min = 1, max = 100, message = "平台标题在1-100之间")
    private String title;
    /**
     * 平台描述
     */
    @TableField("`describe`")
    @NotBlank(message = "平台描述不能为空")
    @Length(min = 1, max = 200, message = "平台描述不在1-200之间")
    private String describe;
    /**
     * 关键词
     */
    @NotBlank(message = "关键词不能为空")
    @Length(min = 1, max = 100, message = "关键词在1-100之间")
    private String keyword;
    /**
     * LOGO
     */
    @NotBlank(message = "平台LOGO不能为空")
    @Length(min = 1, max = 1000, message = "平台LOGO在1-1000之间")
    private String logo;
    /**
     * 客服热线
     */
    @NotBlank(message = "客服热线不能为空")
    @Length(min = 1, max = 20, message = "客服热线在1-20之间")
    private String hotline;
    /**
     * 客服邮箱
     */
    @NotNull(message = "客服邮箱不能为空", groups = {AddGroup.class, UpdateGroup.class})
    @Email(message = "邮箱格式不正确", groups = {AddGroup.class, UpdateGroup.class})
    @Length(min = 1, max = 50, message = "客服邮箱在1-50之间")
    private String emila;

}
